﻿using System.IO;

namespace Engine.FileFormats3D.Tracks
{
    internal class Arrows
    {
        #region Private Fields

        private int BitFlag;
        private float Delta;
        private float[] matrix;
        private float X, Y, Z;

        #endregion Private Fields

        #region Internal Methods

        //Left/Right/Turn/Junction/etc..
        internal static Arrows FromStream(BinaryReader br)
        {
            return new Arrows()
            {
                X = br.ReadSingle(),
                Y = br.ReadSingle(),
                Z = br.ReadSingle(),
                matrix = new float[9]{
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),
                     br.ReadSingle(),},
                Delta = br.ReadSingle(),
                BitFlag = br.ReadInt32()
            };
        }

        #endregion Internal Methods
    }
}